In some conventional processing systems a processor may need to precisely track time to ensure that certain operations are performed at a certain time. For example, Bluetooth communication systems incorporate a frequency hopping scheme that involves continuous changes in the operating frequency of the transmitter and receiver. To accomplish a change in frequency a typical system writes a new frequency value to a programmable frequency synthesizer that generates the clock signal for the transmitter and receiver.
Design constraints in the system generally require, however, that these new frequencies may only be written to the frequency synthesizer at certain times. For example, in a typical system a new frequency value may not be written to the frequency synthesizer when the transmitter is transmitting data or when the receiver is receiving data. Otherwise, the current transmission or reception may be corrupted.
Typically, to ensure that operations are performed at the proper time the processor will periodically read a real time clock in the system to obtain the current time. In this way, the processor may correlate the current time from the real time clock with the proper time for doing an operation (e.g., changing the frequency of a frequency synthesizer).
Conventionally, the processor operation of checking the real time clock may be initiated by a polling routine or by an interrupt routine. In a polling routine the processor will repeatedly read (poll) the real time clock. In an interrupt routine the processor will be periodically interrupted (by, for example, a hardware timer or other hardware generated condition). Once interrupted, the processor will read the real time clock.
Polling or interrupt routines such as these may not perform time-dependent operations efficiently. For example, processor processing cycles may be wasted during execution of the polling routines. That is, the processor may spend a relatively large amount of time simply checking the real time clock to determine whether something needs to be done. In addition, interrupt routines may have problems associated with latency (e.g., the delay after the interrupt is initiated). In addition, when interrupts are prioritized (i.e., some interrupts are given higher priority) other interrupts may not be serviced as often as necessary. Moreover, there are usually a limited number of interrupts in any given system. Consequently, interrupts may be a relatively valuable and therefore scarce resource in a system.